Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 6 - Configuration Management / Configuration Management Reference
Functions / Getting Information About Ports


OTGetDeviceTypeFromPortRef

Extracts the value of the hardware device type from a port reference.

C INTERFACE
UInt16 OTGetDeviceTypeFromPortRef(OTPortRef ref);
C++ INTERFACES
None. C++ applications use the C interface to this function.

PARAMETERS
ref
The port reference from which you wish to extract the
device type.
DESCRIPTION
The OTGetDeviceTypeFromPortRef function extracts the device type value from a port reference with unknown hardware values. You can obtain such a port reference when another application passes one to you or when you use the OTGetIndexedPort function to access a port structure into which another application has put its own port reference.

SEE ALSO
For information about finding ports and obtaining a port reference, see the sections "About Port Information" (page 6-5) and "Obtaining Port Information" (page 6-11).

The possible return values for the OTGetDeviceTypeFromPortRef function are listed in "The Port Reference" (page 6-19).

You can use the OTGetBusTypeFromPortRef function (page 6-39) and the OTGetSlotFromPortRef function (page 6-40) to get the bus type and slot number information from the port reference.

You can use the OTCreatePortRef function (page 6-35) to create a port reference.

Port references are returned by the OTGetIndexedPort function (page 6-32), the OTFindPort function (page 6-33), and the OTFindPortByRef function (page 6-34).

The port structure is described in "The Port Structure" (page 6-17).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996